package jdmx.library.da;

public class DataRow {
	protected DataTable table;
	protected int index;
	protected DataCell[] cells;
	
	public void setCell(String columnName, Object value) {
		DataColumn column = table.getColumn(columnName);
		if (column != null) {
			DataCell cell = new DataCell();
			cell.row = this;
			cell.column = column;
			cell.value = value;
			cells[column.index] = cell;
		}
	}
	
	public DataCell getCell(String columnName) {
		DataCell cell = null;
		DataColumn column = table.getColumn(columnName);
		if (column != null) {
			 cell = cells[column.index];
		}
		return cell;
	}
	
}
